home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
GadgetTags.st
< prev
next >
Wrap
Text File
|
2001-06-02
|
27KB
|
788 lines
" ------------------------------------------------------------------- "
" CheckboxGadgetTag Class allows the User to specify the attributes "
" for CheckBox Gadgets."
" ------------------------------------------------------------------- "
Class CheckboxGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadgetAttr: #GT_Underscore)
put: newMark
|
setCheck
^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked) put: true
|
clearCheck
^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked) put: false
|
enableCheck
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableCheck
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
enableScaling
^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled) put: true
|
disableScaling
^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled) put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
getGTCBChecked
^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked)
|
getGTCBScaled
^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTCB_Checked) put: false.
tagDictionary at: (super getGadToolAttr: #GTCB_Scaled) put: false.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" CycleGadgetTag Class allows the User to specify the attributes of "
" Cycle Gadgets."
" ------------------------------------------------------------------- "
Class CycleGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableCycle
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableCycle
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setLabelsArray: newStringArray
^ tagDictionary at: (super getGadToolAttr: #GTCY_Lables)
put: newStringArray
|
activate: whichChoice
^ tagDictionary at: (super getGadToolAttr: #GTCY_Active)
put: whichChoice
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTCY_Active) put: 0.
tagDictionary at: (super getGadToolAttr: #GTCY_Labels) put: nil.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class ListViewGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableListView
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableListView
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setTopItem: itemNumber
^ tagDictionary at: (super getGadToolAttr: #GTLV_Top) put: itemNumber
|
setVisibleItem: itemNumber
^ tagDictionary at: (super getGadToolAttr: #GTLV_MakeVisible)
put: itemNumber
|
setContents: newStringArray
^ tagDictionary at: (super getGadToolAttr: #GTLV_Labels)
put: newStringArray
|
readOnly
^ tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly) put: true
|
editable
^ tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly) put: false
|
setMaxPen: penNumber
^ tagDictionary at: (super getGadToolAttr: #GTLV_MaxPen)
put: penNumber
|
setItemHeight: itemHeight
^ tagDictionary at: (super getGadToolAttr: #GTLV_ItemHeight)
put: itemHeight
|
setCallBack: functionPtr
^ tagDictionary at: (super getGadToolAttr: #GTLV_CallBack)
put: functionPtr
|
setScrollWidth: width
^ tagDictionary at: (super getGadToolAttr: #GTLV_ScrollWidth)
put: width
|
setSelectViewer: gadgetObject
^ tagDictionary at: (super getGadToolAttr: #GTLV_ShowSelected)
put: gadgetObject
|
setSelectedItem: itemNumber
^ tagDictionary at: (super getGadToolAttr: #GTLV_Selected)
put: itemNumber
|
setItemSpacing: space
^ tagDictionary at: (super getGadgetAttr: #LAYOUTA_Spacing)
put: space
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTLV_Labels) put: nil.
tagDictionary at: (super getGadToolAttr: #GTLV_Top) put: 0.
tagDictionary at: (super getGadToolAttr: #GTLV_MakeVisible) put: 0.
tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly) put: false.
tagDictionary at: (super getGadToolAttr: #GTLV_MaxPen) put: 2.
tagDictionary at: (super getGadToolAttr: #GTLV_ItemHeight) put: 9.
tagDictionary at: (super getGadToolAttr: #GTLV_CallBack) put: nil.
tagDictionary at: (super getGadToolAttr: #GTLV_ScrollWidth) put: 16.
tagDictionary at: (super getGadToolAttr: #GTLV_ShowSelected) put: nil.
tagDictionary at: (super getGadToolAttr: #GTLV_Selected) put: 0.
tagDictionary at: (super getGadgetAttr: #LAYOUTA_Spacing) put: 2.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class RadioGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableRadio
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableRadio
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setRadioLabels: newStringArray
^ tagDictionary at: (super getGadToolAttr: #GTMX_Labels)
put: newStringArray
|
placeTitle: where
^ tagDictionary at: (super getGadToolAttr: #GTMX_TitlePlace)
put: where
|
activate: buttonNumber
^ tagDictionary at: (super getGadToolAttr: #GTMX_Active)
put: buttonNumber
|
useScaling
^ tagDictionary at: (super getGadToolAttr: #GTMX_Scaled) put: true
|
clearScaling
^ tagDictionary at: (super getGadToolAttr: #GTMX_Scaled) put: false
|
setButtonSpacing: space
^ tagDictionary at: (super getGadToolAttr: #GTMX_Spacing) put: space
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTMX_Labels) put: nil.
tagDictionary at: (super getGadToolAttr: #GTMX_TitlePlace) put: 0.
tagDictionary at: (super getGadToolAttr: #GTMX_Active) put: 0.
tagDictionary at: (super getGadToolAttr: #GTMX_Scaled) put: false.
tagDictionary at: (super getGadToolAttr: #GTMX_Spacing) put: 2.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class NumberGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableNumber
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableNumber
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setNumber: newNumber
^ tagDictionary at: (super getGadToolAttr: #GTNM_Number)
put: newNumber
|
leftJustify
^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification)
put: 0
|
rightJustify
^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification)
put: 1
|
centerJustify
^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification)
put: 2
|
useBorder
^ tagDictionary at: (super getGadToolAttr: #GTNM_Border) put: true
|
clearBorder
^ tagDictionary at: (super getGadToolAttr: #GTNM_Border) put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTNM_Number) put: 0.
tagDictionary at: (super getGadToolAttr: #GTNM_Justification) put: 0.
tagDictionary at: (super getGadToolAttr: #GTNM_Border) put: true.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class PaletteGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enablePalette
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disablePalette
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setDepth: newDepth
^ tagDictionary at: (super getGadToolAttr: #GTPA_Depth) put: newDepth
|
setNumberOfColors: maxNumber
^ tagDictionary at: (super getGadToolAttr: #GTPA_NumColors)
put: maxNumber
|
selectedColor: penNumber
^ tagDictionary at: (super getGadToolAttr: #GTPA_Color)
put: penNumber
|
setColorOffset: offset
^ tagDictionary at: (super getGadToolAttr: #GTPA_ColorOffset)
put: offset
|
setColorTable: colorTable
^ tagDictionary at: (super getGadToolAttr: #GTPA_ColorTable)
put: colorTable
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTPA_Depth) put: 1.
tagDictionary at: (super getGadToolAttr: #GTPA_NumColors) put: 2.
tagDictionary at: (super getGadToolAttr: #GTPA_Color) put: 0.
tagDictionary at: (super getGadToolAttr: #GTPA_ColorOffset) put: 0.
tagDictionary at: (super getGadToolAttr: #GTPA_ColorTable) put: nil.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class ScrollerGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableScroller
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableScroller
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setTop: visibleTop
^ tagDictionary at: (super getGadToolAttr: #GTSC_Top) put: visibleTop
|
setTotal: newTotal
^ tagDictionary at: (super getGadToolAttr: #GTSC_Total) put: newTotal
|
setNumber: newNumber
^ tagDictionary at: (super getGadToolAttr: #GTSC_Visible)
put: newNumber
|
useArrows: arrowSize
^ tagDictionary at: (super getGadToolAttr: #GTSC_Arrows)
put: arrowSize
|
verticalScroller
^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 2
|
horizontalScroller
^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 1
|
useImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
|
clearImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
|
useRelease
^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: true
|
clearRelease
^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTSC_Top) put: 0.
tagDictionary at: (super getGadToolAttr: #GTSC_Total) put: 15.
tagDictionary at: (super getGadToolAttr: #GTSC_Arrows) put: 20.
tagDictionary at: (super getGadToolAttr: #GTSC_Visible) put: 0.
tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 0.
tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false.
tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class SliderGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableSlider
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableSlider
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setMinimum: newMin
^ tagDictionary at: (super getGadToolAttr: #GTSL_Min) put: newMin
|
setMaximum: newMax
^ tagDictionary at: (super getGadToolAttr: #GTSL_Max) put: newMax
|
setCurrentLevel: newLevel
^ tagDictionary at: (super getGadToolAttr: #GTSL_Level) put: newLevel
|
setLevelFormat: formatString
^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelFormat)
put: formatString
|
setFormatLength: newMaxLength
^ tagDictionary at: (super getGadToolAttr: #GTSL_MaxLevelLen)
put: newMaxLength
|
placeLevelLeft
^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 1
|
placeLevelRight
^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 2
|
placeLevelAbove
^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 4
|
placeLevelBelow
^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 8
|
setDisplayFunction: functionPtr
^ tagDictionary at: (super getGadToolAttr: #GTSL_DispFunc)
put: functionPtr
|
verticalSlider
^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 2
|
horizontalSlider
^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 1
|
useImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
|
clearImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
|
useRelease
^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: true
|
clearRelease
^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTSL_Min) put: 0.
tagDictionary at: (super getGadToolAttr: #GTSL_Max) put: 15.
tagDictionary at: (super getGadToolAttr: #GTSL_Level) put: 0.
tagDictionary at: (super getGadToolAttr: #GTSL_LevelFormat) put: nil.
tagDictionary at: (super getGadToolAttr: #GTSL_MaxLevelLen) put: 10.
tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 1.
tagDictionary at: (super getGadToolAttr: #GTSL_DispFunc) put: nil.
tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 0.
tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false.
tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class TextGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableText
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableText
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setText: newTextString
^ tagDictionary at: (super getGadToolAttr: #GTTX_Text)
put: newTextString
|
useBorder
^ tagDictionary at: (super getGadToolAttr: #GTTX_Border) put: true
|
clearBorder
^ tagDictionary at: (super getGadToolAttr: #GTTX_Border) put: false
|
setFrontPen: newPen
^ tagDictionary at: (super getGadToolAttr: #GTTX_FrontPen)
put: newPen
|
setBackPen: newPen
^ tagDictionary at: (super getGadToolAttr: #GTTX_BackPen)
put: newPen
|
leftJustify
^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification)
put: 0
|
rightJustify
^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification)
put: 1
|
centerJustify
^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification)
put: 2
|
useClipping
^ tagDictionary at: (super getGadToolAttr: #GTTX_Clipped) put: true
|
clearClipping
^ tagDictionary at: (super getGadToolAttr: #GTTX_Clipped) put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTTX_Text) put: nil.
tagDictionary at: (super getGadToolAttr: #GTTX_Border) put: true.
tagDictionary at: (super getGadToolAttr: #GTTX_Clipped) put: false.
tagDictionary at: (super getGadToolAttr: #GTTX_FrontPen) put: 1.
tagDictionary at: (super getGadToolAttr: #GTTX_BackPen) put: 0.
tagDictionary at: (super getGadToolAttr: #GTTX_Justification) put: 0.
tagDictionary at: (super getGadgetAttr: #GA_Disable) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class IntegerGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableInteger
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableInteger
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setInteger: newInteger
^ tagDictionary at: (super getGadToolAttr: #GTIN_Number)
put: newInteger
|
setMaxDigits: newMaximum
^ tagDictionary at: (super getGadToolAttr: #GTIN_MaxChars)
put: newMaximum
|
useHelpKey
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp)
put: true
|
clearHelpKey
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp)
put: false
|
useTabCycle
^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: true
|
clearTabCycle
^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false
|
setEditHook: hookFunction
^ tagDictionary at: (super getGadToolAttr: #GTIN_EditHook)
put: hookFunction
|
rightJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 1
|
leftJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 0
|
centerJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 2
|
useReplaceMode
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode)
put: true
|
useInsertMode
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode)
put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTIN_Number) put: 0.
tagDictionary at: (super getGadToolAttr: #GTIN_MaxChars) put: 10.
tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false.
tagDictionary at: (super getGadToolAttr: #GTIN_EditHook) put: nil.
tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 0.
tagDictionary at: (super getGadgetAttr: #STRING_ReplaceMode)
put: false.
tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp)
put: false.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ------------------------------------------------------------------- "
Class StringGadgetTag :Intuition ! tagDictionary !
[
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
enableString
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableString
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setString: newString
^ tagDictionary at: (super getGadToolAttr: #GTST_String)
put: newString
|
setStringLength: maxLength
^ tagDictionary at: (super getGadToolAttr: #GTST_MaxChars)
put: maxLength
|
useHelpKey
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp)
put: true
|
clearHelpKey
^ tagDictionary at: (super getGadgetAttr: #STRING_ExitHelp)
put: false
|
useTabCycle
^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: true
|
clearTabCycle
^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false
|
setEditHook: hookFunction
^ tagDictionary at: (super getGadToolAttr: #GTST_EditHook)
put: hookFunction
|
rightJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 1
|
leftJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 0
|
centerJustify
^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 2
|
useReplaceMode
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode)
put: true
|
useInsertMode
^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode)
put: false
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadToolAttr: #GTST_String) put: nil.
tagDictionary at: (super getGadToolAttr: #GTST_MaxChars) put: 10.
tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp)
put: false.
tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
put: 0.
tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode)
put: false.
tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false.
tagDictionary at: (super getGadToolAttr: #GTST_EditHook) put: nil.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]
" ------------------------------------------------------------------- "
" ButtonGadgetTag Class allows the user to specify the attributes of "
" a BUTTON_KIND Gadget that is going to be used in a GUI."
" ------------------------------------------------------------------- "
Class ButtonGadgetTag :Intuition ! tagDictionary !
[
enableButton
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
|
disableButton
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
|
setKeyMarker: newMark
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
put: newMark
|
getGTUnderscore
^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
|
getGADisabled
^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
|
useImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
|
clearImmediate
^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
|
new
tagDictionary <- Dictionary new.
tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false.
tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false.
tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
^ self
]